Cookie

public interface Cookie

An HTTP cookie.

Types

Link copied to clipboard
public final class Builder
A builder of Cookie.

Functions

Link copied to clipboard
Returns the cookie creation time since UNIX epoch.
Link copied to clipboard
public String domain()
Returns a string that represents the domain name of this cookie, or an empty string if the domain name for this cookie is not specified.
Link copied to clipboard
Returns the cookie expiration time since UNIX epoch.
Link copied to clipboard
public boolean isHttpOnly()
Returns true if the cookie is considered HTTP only.
Link copied to clipboard
public boolean isSecure()
Returns true if the cookie is restricted to a secure protocol (HTTPS or WSS) or false if it can be sent using any protocol.
Link copied to clipboard
public String name()
Returns a string that represents the name of this cookie, or an empty string if the cookie name is not specified.
Link copied to clipboard
public static Cookie.Builder newBuilder(String domain)
Creates a new Cookie builder.
Link copied to clipboard
Returns the partition key if the cookie has the independent partitioned state.
Link copied to clipboard
public String path()
Returns a string that represents the path that must exist in the URL of a request in order to send this cookie to the server.
Link copied to clipboard
public SameSite sameSite()
Returns the SameSite cookie attribute value.
Link copied to clipboard
public String value()
Returns a string that represents the value of this cookie, or an empty string if the cookie value is not specified.